package demo3;

public class Test1 {
    public static void main(String[] args) {

    }

    public static void main2(String[] args) {
        //IShape iShape = new IShape();
        //接口虽然是引用类型但不能创建对象

    }

    public static void drawMap(IShape iShape) {
        iShape.draw();
    }

    public static void main1(String[] args) {
        IShape iShape = new Cycle();
        IShape iShape1 = new Rect();

        drawMap(iShape);
        drawMap(iShape1);
    }
}
